package jp.eisbahn.mgapi.api.voice;

import org.json.simple.JSONObject;

import jp.eisbahn.mgapi.api.Model;

/**
 * The model class which has information regarding a user.
 * @author Yoichiro Tanaka
 */
public class User extends Model {

    /**
     * Initialize this instance.
     * @param original The json object which has information regarding a user.
     */
    protected User(final JSONObject original) {
        super(original);
    }

    /**
     * Retrieve the ID.
     * @return The user ID.
     */
    public final String getId() {
        return getPropertyString("id");
    }

    /**
     * Retrieve the screen name.
     * @return The screen name. It is actually the user's nickname.
     */
    public final String getScreenName() {
        return getPropertyString("screen_name");
    }

    /**
     * Retrieve the profile image URL of the user.
     * @return The profile image URL string.
     */
    public final String getProfileImageUrl() {
        return getPropertyString("profile_image_url");
    }

    /**
     * Retrieve the profile URL.
     * @return The profile URL string.
     */
    public final String getUrl() {
        return getPropertyString("url");
    }

    /*
     * (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public final String toString() {
        return "User [getId()=" + getId() + ", getScreenName()="
                + getScreenName() + ", getProfileImageUrl()="
                + getProfileImageUrl() + ", getUrl()=" + getUrl() + "]";
    }

}
